www.gusucode.com > PHP条码扫描管理系统 v1.0PHP源码程序 > PHP条码扫描管理系统 v1.0/wltmglxt_v1.0/wltmglxt_v1.0/upload/protected/extensions/phpexcel/XPHPExcel.php
<?php /** * Wrapper for the PHPExcel library. * @see README.md */ class XPHPExcel extends CComponent { private static $_isInitialized = false; /** * Register autoloader. */ public static function init() { if (!self::$_isInitialized) { spl_autoload_unregister(array('YiiBase', 'autoload')); require(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'PHPExcel.php'); spl_autoload_register(array('YiiBase', 'autoload')); self::$_isInitialized = true; } } /** * Returns new PHPExcel object. Automatically registers autoloader. * @return PHPExcel */ public static function createPHPExcel() { self::init(); return new PHPExcel; } }